package com.swanclouds.redfish.managers.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.DeviceEntity;
import java.util.Map;

public class SecurityServiceModel implements DeviceEntity {

    //安全服务资源的访问路径
    @JsonProperty("@odata.id")
    private String dataId;

    //安全服务资源的描述信息
    @JsonProperty("@odata.context")
    private String context;

    //安全服务资源的类型
    @JsonProperty("@odata.type")
    private String type;

    //安全服务资源ID
    @JsonProperty("Id")
    private String id;

    //安全服务资源名称
    @JsonProperty("Name")
    private String name;

    //安全服务列表
    @JsonProperty("Links")
    private Map<String,Object> links;


    @Override
    public String getDataId() {
        return dataId;
    }

    @Override
    public String getContext() {
        return context;
    }

    @Override
    public String getType() {
        return type;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getName() {
        return name;
    }

    public Map<String,Object> getLinks() {
        return links;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        }catch (JsonProcessingException e){
        }
        return "SecurityServiceModel{" +
                "dataId='" + dataId + '\'' +
                ", context='" + context + '\'' +
                ", type='" + type + '\'' +
                ", id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", links=" + links +
                '}';
    }
}
